#include "HttpServer.hpp"

#include <memory>
#include <string>

std::string HanderHttp(const std::string &message)
{
    std::string respon=message;
    return respon;
}

using namespace std;
static void Usage(std::string proc)
{
    std::cout << "Usage:\n\t" << proc << " port\n"
              << std::endl;
}

int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        Usage(argv[1]);
        exit(USE_ERR);
    }
    uint16_t port = atoi(argv[1]);

    unique_ptr<HttpServer> hs(new HttpServer(HanderHttp,port));
    hs->InitServer();
    hs->Start();
    return 0;
}